<template>
  <div class="base-config">
    <el-form :model="form" label-width="120px">
      <el-form-item label="配置名称">
        <el-input v-model="form.name" placeholder="请输入配置名称" />
      </el-form-item>
      <el-form-item label="配置值">
        <el-input v-model="form.value" placeholder="请输入配置值" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="saveConfig">保存</el-button>
        <el-button @click="resetForm">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { reactive } from 'vue'
import { ElMessage } from 'element-plus'

const form = reactive({
  name: '',
  value: ''
})

const saveConfig = () => {
  ElMessage.success('配置已保存')
}

const resetForm = () => {
  form.name = ''
  form.value = ''
}
</script>

<style scoped>
.base-config {
  padding: 20px;
}
</style>